package br.uece.laconi.tac;
import java.util.Arrays;
import java.util.Collections;
import java.util.Properties;

import se.sics.tac.aw.AgentImpl;
import se.sics.tac.aw.TACAgent;
import se.sics.tac.solver.FastOptimizer;
import se.sics.tac.solver.Solver;
import se.sics.tac.util.ArgEnumerator;
import br.uece.laconi.tac.rn.TACNeuraNetwork;
import br.uece.laconi.util.Util;


public class Teste extends TACAgent {

	public Teste(AgentImpl agent, ArgEnumerator a, Properties config) {
		super(agent, a, config);
		// TODO Auto-generated constructor stub
	}

	public static void main(String [] args){
		
	int preferences[][] = new int[][] { 
		  { 2, 5, 0, 37, 105, 2 },
			{ 1, 5, 0, 172, 146, 73 }, 
			{ 2, 3, 0, 68, 161, 36 },
			{ 1, 5, 0, 10, 11, 112 }, 
			{ 2, 3, 0, 171, 61, 187 },
			{ 2, 4, 0, 178, 192, 40 }, 
			{ 3, 5, 0, 114, 25, 168 },
			{ 3, 5, 0, 62, 155, 54 } 
			};
	int own[][] = new int[][] { 
			{ 0, 0, 8, 8, 4, 0, 0 },
			{ 0, 0, 8, 8, 0, 2, 0 }, 
			{ 0, 0, 8, 8, 0, 0, 4 },
			{ 0, 0, 8, 8, 0, 2, 0 }, 
			{ 0, 0, 0, 0, 0, 0, 0 } };
//	int own[][] = new int[][] { 
//			{ 2, 0, 8, 8, 4, 0, 0 },
//			{ 4, 0, 8, 8, 0, 2, 0 }, 
//			{ 2, 2, 8, 8, 0, 0, 4 },
//			{ 0, 1, 8, 8, 0, 2, 0 }, 
//			{ 0, 5, 0, 0, 0, 0, 0 } };	

	
	
//	Util.visualizarMatriz(dias, "dias ");
	System.out.println("utilidadeMax " + Util.utilidadeMax(preferences, own));
	
//	Util.visualizarMatriz(comprar, "comprar");
	
		
//		float a =  200.0f;
//		if(a == 200.0f)
//			System.out.println("asdf");
//		System.out.println(TACAgent.getAuctionTypeAsString(TACAgent.getAuctionFor(TACAgent.CAT_ENTERTAINMENT, 3, 1)));	
//		Util.visualizarMatriz(a, "asdf");
		
//		System.out.println(TACNeuraNetwork.execute(new double[][]{{0.45,0.37,0.5}})*200f);

		
//		Bid bid = new Bid(16);
//		bid.addBidPoint(-2, 11f);
//		System.out.println(bid.getQuantity() +" "+ bid.getAuction()+" "+bid.getPrice(1));
//		
//		
//		int [] own = new int []{1,1,1,1,1,1,1,1,1,1,1,1,2,3,4,5,1,1,1,1,1,1,1,1,1,1,1,1};
//		System.out.println(own.length);
//		int [][] b = new int [5][7];
//		for (int i=0; i<28; i++) {
//			int d = TACAgent.getAuctionDay(i);
//			b[d-1][i/4] = own[i];//valor max i = 27, logo valor max de i/4 = 6;
//		}
//		Util.visualizarMatriz(b, "teste");
//		
//		
//		Bid [] asdf = new Bid[12];
//		Bid a = new Bid(0);
//		for (int i = 0; i < asdf.length; i++) {
//			asdf[i] = a;
//			if(asdf[i].getAuction() != 0)
//				System.out.println(asdf[i].getBidString());
//		}

		
		
	}
	

}
